﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace REVISIONMAX30
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private DataObjects.DataMain dataMain = null;
        private UIHandler uiHandler = null;


        private void frmMain_Load(object sender, EventArgs e)
        {
            uiHandler = new UIHandler(dpMainMdi);

            uiHandler.InitResultPanel();

            this.dataMain = DataObjects.DataMain.Load(uiHandler.AddResult);

            uiHandler.InitGroupPanel(this.dataMain);
        }

        private void btnShowHideGroups_Click(object sender, EventArgs e)
        {
            btnShowHideGroups.Text = uiHandler.ShowHideGroups();
        }

        private void btnShowHideResults_Click(object sender, EventArgs e)
        {
            btnShowHideResults.Text = uiHandler.ShowHideResults();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            this.dataMain.Save(uiHandler.AddResult);
        }


    }
}
